<h3>Line</h3>
<div style="float: left;width:30%;">
    <canvas id="myCanvas_line" width="200px" height="200px" style="border:1px solid #d3d3d3;">
    Your browser does not support the HTML5 canvas tag.</canvas>
</div>

<div style="float: left;padding:0% 1% 1% 1%;width:68%;">
<textarea style="width: 100%;height: 300px;" id="code_line">
var c=document.getElementById("myCanvas_line");
c.width = c.width; //reset canvas

var ctx=c.getContext("2d");
ctx.moveTo(0,0);
ctx.lineTo(200,100);
ctx.stroke();

</textarea>
<input type="button" value="run" onclick="run_code('#code_line')" />
    
</div>

<script type="text/javascript">
<!--
    $(function(){
	   run_code('#code_line');
	})
-->
</script>
